package com.huawei.appgallery.search.ui.node;

import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;
import com.huawei.appgallery.search.ui.card.BaseCompositeCard;
import com.huawei.appgallery.search.ui.card.SearchSpecialTopicCard;
import com.huawei.appgallery.search.ui.card.SearchSpecialTopicItemCard;
import com.huawei.appgallery.search.ui.card.SearchSpecialTopicItemSubCard;
import java.util.ArrayList;
import java.util.List;
import o.cuv.a;
import o.cuv.b;
import o.dyf;
import o.dyk;

public class SearchSpecialTopicNode extends BaseCompositeNode {
    public SearchSpecialTopicNode(Context context) {
        super(context);
    }

    public BaseCompositeCard ˋ() {
        return new SearchSpecialTopicCard(this.ॱ);
    }

    protected void ॱ(View view) {
        if (view != null) {
            LinearLayout linearLayout = (LinearLayout) view.findViewById(b.ˋʻ);
            if (linearLayout != null) {
                linearLayout.setMinimumHeight(this.ॱ.getResources().getDimensionPixelSize(a.ͺ) - linearLayout.getPaddingBottom());
                linearLayout.setPaddingRelative(linearLayout.getPaddingStart(), linearLayout.getPaddingTop(), linearLayout.getPaddingEnd(), 0);
            }
        }
    }

    public ArrayList<String> z_() {
        ArrayList<String> arrayList = new ArrayList();
        for (int i = 0; i < ˊॱ(); i++) {
            if (ˊ(i) instanceof SearchSpecialTopicCard) {
                List ˊ = ((SearchSpecialTopicCard) ˊ(i)).ˊ();
                for (int i2 = 0; i2 < ˊ.size(); i2++) {
                    if (ˊ.get(i2) instanceof SearchSpecialTopicItemCard) {
                        List ˋ = ((SearchSpecialTopicItemCard) ˊ.get(i2)).ˋ();
                        for (int i3 = 0; i3 < ˋ.size(); i3++) {
                            if (ˋ.get(i3) instanceof SearchSpecialTopicItemSubCard) {
                                SearchSpecialTopicItemSubCard searchSpecialTopicItemSubCard = (SearchSpecialTopicItemSubCard) ˋ.get(i3);
                                View ˉ = searchSpecialTopicItemSubCard.ˉ();
                                if (ˉ != null && new dyf().ˎ(ˉ)) {
                                    String ˏ = dyk.ˏ(searchSpecialTopicItemSubCard);
                                    if (ˏ != null) {
                                        arrayList.add(ˏ);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return arrayList;
    }
}
